package com.learning.code.multithread.keyword.message;

public class WaitService {

    public void testMethod(Object lock){
        try{
           synchronized (lock){
               System.out.println("开始等待... threadName = " + Thread.currentThread().getName());
               lock.wait();
               System.out.println("结束等待... threadName = " + Thread.currentThread().getName());

           }
        }catch (InterruptedException e){

        }

    }

}
